<!DOCTYPE html>
<html>
<head>
	<title>symbol静态方法</title>
</head>
<body>
<script type="text/javascript">
	
/*
	1. Symbol.for如果存在同名，则直接将其赋值，如果不存在就重新创建
*/

let name = Symbol.for('name');
let namea = Symbol.for('name');
let nameb = Symbol('name');
console.log(name === namea);
console.log(name === nameb);
name = Symbol('namea');
console.log(nameb);

</script>
</body>
</html>